package com.tuyrt.`as`.proj.main.http.api

import com.tuyrt.`as`.proj.main.model.HomeModel
import com.tuyrt.`as`.proj.main.model.TabCategory
import com.tuyrt.hi.library.restful.HiCall
import com.tuyrt.hi.library.restful.annotation.CacheStrategy
import com.tuyrt.hi.library.restful.annotation.Field
import com.tuyrt.hi.library.restful.annotation.GET
import com.tuyrt.hi.library.restful.annotation.Path


interface HomeApi {

    @CacheStrategy(CacheStrategy.CACHE_FIRST)
    @GET("category/categories")
    fun queryTabList(): HiCall<List<TabCategory>>

    @GET("home/{categoryId}")
    fun queryTabCategoryList(
        @CacheStrategy cacheStrategy: Int,
        @Path("categoryId") categoryId: String,
        @Field("pageIndex") pageIndex: Int,
        @Field("pageSize") pageSize: Int,
    ): HiCall<HomeModel>
}